<div class="ui right floated pagination menu">
  <?php if ($page>1): ?>
  <a href="/webadmin/role?page=<?php echo $page-1; ?>" class="icon item">
    <i class="left chevron icon"></i>
  </a>
  <?php endif; ?>
  <a href="/webadmin/role?page=1" class="item">首页</a>
  <?php if ($page>3): ?>

    <a href="/webadmin/role?page=<?php echo $page-3; ?>" class="item"><?php echo $page-3; ?></a>

  <?php endif; ?>
  <?php if ($page>2): ?>

    <a href="/webadmin/role?page=<?php echo $page-2; ?>" class="item"><?php echo $page-2; ?></a>

  <?php endif; ?>
  <?php if ($page>1): ?>

    <a href="/webadmin/role?page=<?php echo $page-1; ?>" class="item"><?php echo $page-1; ?></a>

  <?php endif; ?>
  <a class="active item"><?php echo $page; ?></a>
  <a href="/webadmin/role?page=<?php echo $page+1; ?>" class="item"><?php echo $page+1; ?></a>
  <a href="/webadmin/role?page=<?php echo $page+2; ?>" class="item"><?php echo $page+2; ?></a>
  <a href="/webadmin/role?page=<?php echo $page+3; ?>" class="item"><?php echo $page+3; ?></a>
  <a href="/webadmin/role?page=<?php echo $page+1; ?>" class="icon item">
    <i class="right chevron icon"></i>
  </a>
</div>
